<#include "/main.ftl"/>
<body>
<@diamondNav/>
<div id="content" style="margin-left: 70px;">
    <div class="panel-body" style="padding-bottom:0px;">
        <div id="toolbar" class="btn-group">
            <button id="btn_add" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
            </button>
            <#if shareType !=1>
                <button id="btn_edit" type="button" class="btn btn-default">
                    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
                </button>
            </#if>
            <button id="btn_delete" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
            </button>
            <button id="btn_back" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>返回项目列表页面
            </button>
        </div>
        <table id="dataTable"></table>
        <input type="hidden" name="projectId" id="projectId" value="${projectId!}">
        <input type="hidden" name="shareType" id="shareType" value="${shareType!}">
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="myModalLabel">绑定headers</h4>
                    </div>
                    <div class="modal-body" id="myModalBody">

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" id="btn_Submit" class="btn btn-primary">提交更改</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>

    </div>
</div>
</body>
<script src="${base}/scripts/projectShare.js"></script>
<script type="text/javascript">
    var shareType;
    $(document).ready(function () {
        //从model里面获取shareType,freemaker的的数据赋值给javascript对象
        shareType =${shareType};

        //1.初始化Table
        var oTable = new ProjectShareTable();
        oTable.Init();

        //2.初始化Button的点击事件
        var oButtonInit = new ProjectShareButtonInit();
        oButtonInit.Init();
    });
</script>